package util; /**
 * @projectName algorithm
 * @package PACKAGE_NAME
 * @className PACKAGE_NAME.GeneratorRandomArr
 */

/**
 * GeneratorRandomArr
 * @description 生成随机数组
 * @author answer_wx
 * @date 2022/6/27 20:12
 * @version 1.0
 */
public class GeneratorRandomArr {
    /**
     * 生成长度maxSize，最大值maxValue的数组
     * @param maxSize
     * @param maxValue
     * @return
     */
    public static int[] generator(int maxSize, int maxValue) {
//        int[] arr = new int[(int) (Math.random() * (maxSize + 1))];
        int[] arr = new int[100000];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) (Math.random() * (maxValue + 1)) - (int) (Math.random() * (maxValue + 1));
        }
        return arr;
    }
}